/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package cn.pp.pwdkeyboard;

import android.widget.Button;
import android.widget.ImageView;
import java.util.Vector;

class a implements c {
    public void a(String paramString) {
        int i = PPKeyboard.b(this.a).size();
        if (i < 6) {
            PPKeyboard.c(this.a).a.setEnabled(false);
            if (i == 0)
                System.arraycopy(new byte[6], 0, PPKeyboard.d(this.a), i, 6);
            System.arraycopy(paramString.getBytes(), 0, PPKeyboard.d(this.a), i, paramString.getBytes().length);
            byte[] arrayOfByte = PPKeyboard.e(this.a).a(PPKeyboard.d(this.a), 1);
            System.arraycopy(arrayOfByte, 0, PPKeyboard.d(this.a), i, arrayOfByte.length);
            PPKeyboard.b(this.a).add(arrayOfByte);
            PPKeyboard.c(this.a).b[i].setImageDrawable(PPKeyboard.c(this.a).a());
            PPKeyboard.a(this.a).onPwdChange(PPKeyboard.b(this.a).size() - 1, PPKeyboard.b(this.a).size());
            if (PPKeyboard.b(this.a).size() != 6)
                return;
            PPKeyboard.c(this.a).a.setEnabled(true);
        }
        else {
            PPKeyboard.c(this.a).a.setEnabled(true);
        }
    }

    public void a() {
        PPKeyboard.c(this.a).a.setEnabled(false);
        int i = PPKeyboard.b(this.a).size();
        if (i <= 0)
            return;
        PPKeyboard.c(this.a).b[(i - 1)].setImageDrawable(null);
        if (PPKeyboard.b(this.a).size() > 1) {
            PPKeyboard.b(this.a).remove(PPKeyboard.b(this.a).size() - 1);
            System.arraycopy(new byte[6], 0, PPKeyboard.d(this.a), 0, 6);
            System.arraycopy(PPKeyboard.f(this.a), 0, PPKeyboard.d(this.a), 0, PPKeyboard.f(this.a).length);
        }
        else if (PPKeyboard.b(this.a).size() == 1) {
            PPKeyboard.b(this.a).clear();
        }
        PPKeyboard.a(this.a).onPwdChange(PPKeyboard.b(this.a).size() + 1, PPKeyboard.b(this.a).size());
    }

    public void a(int paramInt) {
        PPKeyboard.b(this.a, paramInt);
    }
}